﻿<!-- #include file="mymin.asp" -->
<%
Call Head2()
w "<title>评论管理</title></head><body><div class='main400'>"& systemMsgRoot

dim rs,sql,exsql
set rs=server.createobject("adodb.recordset")
exsql=""
If key=2 And keyids<>"" Then exsql="where j.classid in ("&keyids&")"
sql="Select h.id,h.ip,h.smsid,h.pl,h.pltime,j.classid,j.title from 74hu_pl h left join 74hu_article j on h.smsid=j.id "&exsql&" order by h.id desc"

rs.open sql,myconn,1,1
If Not rs.eof Then
	Dim pagesize,count,page,i,pid
	PageSize=10
	Count=rs.recordcount
	page=getN("page",1)
	if page<1 then page=1
	pagecount=(count+pagesize-1)\pagesize
	if page>pagecount then page=pagecount
	rs.move(pagesize*(page-1))
	For i=1 To PageSize
		If rs.eof Then Exit For
		smsid=rs("smsid")
		plid=rs("id")
		plip=rs("ip")
		plnr=nowml(rs("pl"))
		plsj=fordate2(rs("pltime"))
		id = smsid
		ids = rs("classid")
		title = nowml(rs("title"))
		if IsNumeric(plip) then
			plip ="评论会员ID：<a href=""../bbs/detail.asp?sid="&sid&"&amp;id="&plip&""">"&plip&"</a>"
		Else
			plip ="评论网友IP："&plip
		end if
		pid=i+(page-1)*PageSize
		if smsid<>0 then
			w pid&"、评论文章：<a href='smsview.asp?sid="&sid&"&amp;id="&id&"&amp;ids="&ids&"&amp;TP=1'>"&_
				""&title&"</a><br/>"&plip&"<br/>时间："&plsj&"<br/>内容："&plnr&"<br/>"&_
				"<a href='delpl.asp?sid="&sid&"&amp;id="&plid&"'>[删除这条评论]</a><br/>"
		else
			w pid&"、网站群聊<br/>"&plip&"<br/>时间："&plsj&"<br/>内容："&plnr&"<br/>"&_
				"<a href='delpl.asp?sid="&sid&"&amp;id="&plid&"'>[删除这条评论]</a><br/>"
		end if
		rs.moveNext
	Next
	w showPage("adminpl.asp", "", page, pageCount)
Else
	w "暂时没有评论！"
end if
rs.close
set rs=nothing

If key=0 Then w "<br/><a href='qkpin.asp?sid="&sid&"'>[清空评论]</a>"

call Last2%>